package com.itheima.test10;


/**
 * @Author:gy
 * @Date: 2025/09/01 14:32
 * @Description:
 */
public class Demo {
    public static void main(String[] args) {
        /*
           创建一个卖票的类的对象
           创建三个threag类,把MyRunable作为参数进行传递,给线程起个名字
           启动线程
        * */
        MyRunable mr = new MyRunable();
        Thread t1 = new Thread(mr);
        Thread t2 = new Thread(mr);
        //t2.setPriority(6);
        Thread t3 = new Thread(mr);
        t1.setName("窗口一");
        t2.setName("窗口二");
        t3.setName("窗口三");
        t1.start();
        t2.start();
        t3.start();
    }
}
